import request from '@/config/axios'

export interface TenantProductVO {
  id: number
  bizType: number
  bizName: string
  bizPrice: number
  bizUnit: string
  remark: string
}

// 查询系统产品列表
export const getTenantProductPage = async (params) => {
  return await request.get({ url: `/system/tenant-product/page`, params })
}

// 查询系统产品详情
export const getTenantProduct = async (id: number) => {
  return await request.get({ url: `/system/tenant-product/get?id=` + id })
}

// 新增系统产品
export const createTenantProduct = async (data: TenantProductVO) => {
  return await request.post({ url: `/system/tenant-product/create`, data })
}

// 修改系统产品
export const updateTenantProduct = async (data: TenantProductVO) => {
  return await request.put({ url: `/system/tenant-product/update`, data })
}

// 删除系统产品
export const deleteTenantProduct = async (id: number) => {
  return await request.delete({ url: `/system/tenant-product/delete?id=` + id })
}

// 导出系统产品 Excel
export const exportTenantProduct = async (params) => {
  return await request.download({ url: `/system/tenant-product/export-excel`, params })
}